<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.util.container.more.Vector</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.util.container.more.Vector";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.util.container.more.Vector.html" class="symbol">tango.util.container.more.Vector</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Initial release: April 2008
<p class="sec_header">Author:</p>Kris
<p class="sec_header">Since:</p>0.99.7
<dl>
<dt class="decl">struct <a class="symbol _struct" name="Vector" href="./htmlsrc/tango.util.container.more.Vector.html#L28" kind="struct" beg="28" end="248">Vector</a><span class="tparams">(V, int Size)</span>; <a title="Permalink to this symbol" href="#Vector" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L28">#</a></dt>
<dd class="ddef">
<div class="summary">A vector of the given value-type V, with maximum depth Size. Note
        that this does no memory allocation of its own</div>
<dl>
<dt class="decl">void <a class="symbol _function" name="Vector.clear" href="./htmlsrc/tango.util.container.more.Vector.html#L42" kind="function" beg="42" end="45">clear</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Vector.clear" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L42">#</a></dt>
<dd class="ddef">
<div class="summary">Clear the vector</div></dd>
<dt class="decl">uint <a class="symbol _function" name="Vector.size" href="./htmlsrc/tango.util.container.more.Vector.html#L53" kind="function" beg="53" end="56">size</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Vector.size" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L53">#</a></dt>
<dd class="ddef">
<div class="summary">Return depth of the vector</div></dd>
<dt class="decl">uint <a class="symbol _function" name="Vector.unused" href="./htmlsrc/tango.util.container.more.Vector.html#L64" kind="function" beg="64" end="67">unused</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Vector.unused" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L64">#</a></dt>
<dd class="ddef">
<div class="summary">Return remaining unused slots</div></dd>
<dt class="decl">Vector <a class="symbol _function" name="Vector.clone" href="./htmlsrc/tango.util.container.more.Vector.html#L75" kind="function" beg="75" end="81">clone</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Vector.clone" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L75">#</a></dt>
<dd class="ddef">
<div class="summary">Returns a (shallow) clone of this vector</div></dd>
<dt class="decl">V <a class="symbol _function" name="Vector.add" href="./htmlsrc/tango.util.container.more.Vector.html#L91" kind="function" beg="91" end="97">add</a><span class="params">(V <em>value</em>)</span>; <a title="Permalink to this symbol" href="#Vector.add" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L91">#</a></dt>
<dd class="ddef">
<div class="summary">Add a value to the vector.</div>
Throws an exception when the vector is full</dd>
<dt class="decl">void <a class="symbol _function" name="Vector.addMore" href="./htmlsrc/tango.util.container.more.Vector.html#L107" kind="function" beg="107" end="111">addMore</a><span class="params">(V[] <em>value</em>...)</span>; <a title="Permalink to this symbol" href="#Vector.addMore" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L107">#</a></dt>
<dd class="ddef">
<div class="summary">Add a series of values to the vector.</div>
Throws an exception when the vector is full</dd>
<dt class="decl">V <a class="symbol _function" name="Vector.remove" href="./htmlsrc/tango.util.container.more.Vector.html#L121" kind="function" beg="121" end="127">remove</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Vector.remove" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L121">#</a></dt>
<dd class="ddef">
<div class="summary">Remove and return the most recent addition to the vector.</div>
Throws an exception when the vector is empty</dd>
<dt class="decl">V <a class="symbol _function" name="Vector.remove:2" href="./htmlsrc/tango.util.container.more.Vector.html#L138" kind="function" beg="138" end="151">remove</a><span class="params">(uint <em>i</em>)</span>; <a title="Permalink to this symbol" href="#Vector.remove:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L138">#</a></dt>
<dd class="ddef">
<div class="summary">Index vector entries, where a zero index represents the
                oldest vector entry.</div>
Throws an exception when the given index is out of range</dd>
<dt class="decl">V <a class="symbol _function" name="Vector.opIndex" href="./htmlsrc/tango.util.container.more.Vector.html#L161" kind="function" beg="161" end="167">opIndex</a><span class="params">(uint <em>i</em>)</span>; <a title="Permalink to this symbol" href="#Vector.opIndex" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L161">#</a></dt>
<dd class="ddef">
<div class="summary">Index vector entries, as though it were an array</div>
Throws an exception when the given index is out of range</dd>
<dt class="decl">V <a class="symbol _function" name="Vector.opIndexAssign" href="./htmlsrc/tango.util.container.more.Vector.html#L177" kind="function" beg="177" end="186">opIndexAssign</a><span class="params">(V <em>value</em>, uint <em>i</em>)</span>; <a title="Permalink to this symbol" href="#Vector.opIndexAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L177">#</a></dt>
<dd class="ddef">
<div class="summary">Assign vector entries as though it were an array.</div>
Throws an exception when the given index is out of range</dd>
<dt class="decl">V[] <a class="symbol _function" name="Vector.slice" href="./htmlsrc/tango.util.container.more.Vector.html#L198" kind="function" beg="198" end="201">slice</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Vector.slice" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L198">#</a></dt>
<dd class="ddef">
<div class="summary">Return the vector as an array of values, where the first
                array entry represents the oldest value. 
                
                Doing a foreach() on the returned array will traverse in
                the opposite direction of foreach() upon a vector</div></dd>
<dt class="decl">V <a class="symbol _function" name="Vector.error" href="./htmlsrc/tango.util.container.more.Vector.html#L209" kind="function" beg="209" end="212">error</a><span class="params">(size_t <em>line</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#Vector.error" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L209">#</a></dt>
<dd class="ddef">
<div class="summary">Throw an exception</div></dd>
<dt class="decl">int <a class="symbol _function" name="Vector.opApply" href="./htmlsrc/tango.util.container.more.Vector.html#L220" kind="function" beg="220" end="227">opApply</a><span class="params">(int delegate(ref V value) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#Vector.opApply" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L220">#</a></dt>
<dd class="ddef">
<div class="summary">Iterate from the most recent to the oldest vector entries</div></dd>
<dt class="decl">int <a class="symbol _function" name="Vector.opApply:2" href="./htmlsrc/tango.util.container.more.Vector.html#L235" kind="function" beg="235" end="247">opApply</a><span class="params">(int delegate(ref V value, ref bool kill) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#Vector.opApply:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.more.Vector.html#L235">#</a></dt>
<dd class="ddef">
<div class="summary">Iterate from the most recent to the oldest vector entries</div></dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2008 Kris Bell. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:08 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>